package com.visitorspecials.tankbattle.server;

import java.util.Date;
import java.util.*;

public class MovingActor extends Actor
{	
	protected Vector2 _speed;
	
	public Vector2 getSpeed()
	{
		return this._speed;
	}
	
	public void setSpeed(Vector2 speed)
	{
		this._speed = speed;
	}
	
	public MovingActor(String textureName, Vector2 loc, float size, Vector2 speed, ArrayList<Actor> list)
	{
		super(textureName, loc, size, list);
		this.setSpeed(speed);
	}
	
	@Override
	public void update(float elapsed)
	{
		super.update(elapsed);
		
		this._location = Vector2.add(this._location, Vector2.scale(this._speed, elapsed));
	}
}